/*============================================================================*/
/*                   CONTINENTAL AUTOMOTIVE SYSTEMS                           */
/*============================================================================*/
/*                        OBJECT SPECIFICATION                                */
/*============================================================================*
* name:            MALPIT_Init.c
* version:         1.1
* created_by:      Lizette Acosta/Rodrigo Casados
* date_created:    June 22 2013
*=============================================================================*/
/* DESCRIPTION : Initializes ports                                            */
/*============================================================================*/
/* FUNCTION COMMENT : Initializes PIT                                         */
/* application stuff.                                                         */
/*                                                                            */
/*============================================================================*/
/*  REVISION |   DATE      |                               |      AUTHOR      */
/*----------------------------------------------------------------------------*/
/*  1.1      | 22/June/2013 |                              | Lizette Acosta   */
/*                                                           Rodrigo Casados  */
/*============================================================================*/

#include "stdtypedef.h"
#include "HALPIT_Init.h"
#include "MALPIT.h"
#include "HALDebouncer.h"


void PIT_INIT(void)
{
	PIT_device_init();		/* Initializes PIT */
	PIT_channel_configure(PIT_CHANNEL_0_10ms , NULL);	/* Configures PIT for 10ms on channel  0 */
	PIT_channel_configure(PIT_CHANNEL_1_100ms , NULL);	/* Configures PIT for 100ms on channel 1 */
	PIT_InstallInt();	/* Install Interrupt routine for specific channels */
}


void vfn_Start_10ms_PIT (void)
{
	PIT_channel_start(PIT_CHANNEL_0_10ms);
}
